package com.ruoyi.db.ums.domain;

import com.ruoyi.db.ums.domain.query.UmsAddressQueryVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * 收货地址对象 ums_address
 *
 * @author ruoyi
 * @date 2020-04-22
 */

@ApiModel("收货地址实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class UmsAddress extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("收货地址编号")
    private Long id;

    @ApiModelProperty("收货人名称")
    @Excel(name = "收货人名称")
    @NotBlank(message = "收货人名称不能为空")
    @Size(min = 0, max = 63, message = "收货人名称长度不能超过63个字符")
    private String name;

    @ApiModelProperty("用户表的用户ID")
    @Excel(name = "用户表的用户ID")
    @NotBlank(message = "用户表的用户ID不能为空")
    private Long userId;

    @ApiModelProperty("行政区域表的省ID")
    @Excel(name = "行政区域表的省ID")
    @NotBlank(message = "行政区域表的省ID不能为空")
    @Size(min = 0, max = 63, message = "行政区域表的省ID长度不能超过63个字符")
    private String province;

    @ApiModelProperty("行政区域表的市ID")
    @Excel(name = "行政区域表的市ID")
    @NotBlank(message = "行政区域表的市ID不能为空")
    @Size(min = 0, max = 63, message = "行政区域表的市ID长度不能超过63个字符")
    private String city;

    @ApiModelProperty("行政区域表的区县ID")
    @Excel(name = "行政区域表的区县ID")
    @NotBlank(message = "行政区域表的区县ID不能为空")
    @Size(min = 0, max = 63, message = "行政区域表的区县ID长度不能超过63个字符")
    private String county;

    @ApiModelProperty("详细收货地址")
    @Excel(name = "详细收货地址")
    @NotBlank(message = "详细收货地址不能为空")
    @Size(min = 0, max = 127, message = "详细收货地址长度不能超过127个字符")
    private String addressDetail;

    @ApiModelProperty("地区编码")
    @Excel(name = "地区编码")
    @Size(min = 0, max = 6, message = "地区编码长度不能超过6个字符")
    private String areaCode;

    @ApiModelProperty("邮政编码")
    @Excel(name = "邮政编码")
    @Size(min = 0, max = 6, message = "邮政编码长度不能超过6个字符")
    private String postalCode;

    @ApiModelProperty("手机号码")
    @Excel(name = "手机号码")
    @NotBlank(message = "手机号码不能为空")
    @Size(min = 0, max = 20, message = "手机号码长度不能超过20个字符")
    private String tel;

    @ApiModelProperty("是否默认地址")
    @Excel(name = "是否默认地址")
    @NotBlank(message = "是否默认地址不能为空")
    private Boolean isDefault;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;
}
